package com.together.sfipp.service.impl;

import com.together.sfipp.mapper.BabyMapper;
import com.together.sfipp.pojo.Baby;
import com.together.sfipp.service.BabyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class BabyServiceImpl implements BabyService{
    @Autowired
    private BabyMapper babyMapper;

    @Override
    public Integer selectAmount(String babyRules) {
        return babyMapper.selectAmount(babyRules);
    }

    @Override
    public void insert(Baby baby) {
        babyMapper.insert(baby);
    }

    @Override
    public void delete(Integer babyId) {
        babyMapper.delete(babyId);
    }

    @Override
    public void update(Baby baby) {
        babyMapper.update(baby);
    }

    @Override
    public List<Baby> selectAll() {
        return babyMapper.selectAll();
    }

    @Override
    public List<Baby> selectNeed(Map<String, Object> params) {
        return babyMapper.selectNeed(params);
    }
}
